package com.itheima.io.properties.demo02;

import java.io.*;
import java.util.Properties;
import java.util.Set;

public class PropertiesIoDemo02 {

    public static void main(String[] args) throws IOException {

        Properties properties = new Properties();

        properties.setProperty("蓝忘机", "16");
        properties.store(new FileWriter("itheima-io-properties\\a.txt"), " ");

        properties.load(new FileInputStream("itheima-io-properties\\a.txt"));

        Set<String> stringSet = properties.stringPropertyNames();
        for (String key : stringSet){
            String value = properties.getProperty(key);
            System.out.println(key + "-----" + value);
        }
    }

}
